/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aionengine.gameserver.services.custom;

import com.aionemu.commons.utils.Rnd;
import com.aionengine.gameserver.model.TeleportAnimation;
import com.aionengine.gameserver.model.gameobjects.player.Player;
import com.aionengine.gameserver.services.teleport.TeleportService2;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author BlackCore
 */
public class Teleport {
    public static void teleportToPVP(Player player) {
            switch (PVPInstanceService.getPVPInstanceMap()){
                          case TIAMARANTA:
        if(!player.isInTeam()){
                float[] rnd2 = tiamaranta.get(Rnd.get(0, tiamaranta.size() - 1));
                TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), rnd2[0], rnd2[1], rnd2[2], (byte) 0);
       
        }
         else
                                switch(player.getRace()) {
					case ELYOS:
						TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), 1702, 1338, 37, (byte) 90,TeleportAnimation.BEAM_ANIMATION);
						break;
                                        case ASMODIANS:
						TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), 1377, 1713, 23, (byte) 30,TeleportAnimation.BEAM_ANIMATION);
						break;
				}
                                break;
                              
                            case UNDERGROUND_KATALAM:
         if(!player.isInTeam()){
                float[] rnd1 = katalam.get(Rnd.get(0, katalam.size() - 1));
                TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), rnd1[0], rnd1[1], rnd1[2], (byte) 0);
       
        }
         else
                                switch(player.getRace()) {
					case ELYOS:
						TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), 493, 1045, 565, (byte) 90,TeleportAnimation.BEAM_ANIMATION);
						break;
                                        case ASMODIANS:
						TeleportService2.teleportTo(player, PVPInstanceService.getPVPInstanceMap().getId(), PVPInstanceService.getPVPInstanceId(), 303, 690, 563, (byte) 30,TeleportAnimation.BEAM_ANIMATION);
						break;
				}
                                break;
                                
                        }
				
		
              
    }
    private static List<float[]> poeta = new ArrayList<float[]>(Arrays.asList(
            new float[]{1209f ,1044f ,141f},
            new float[]{1084f ,1048f ,139f},            
            new float[]{1001f, 1150f, 110f},
            new float[]{914f, 1046f, 113f},
            new float[]{928f, 1281f, 115f}));
    
    private static List<float[]> katalam = new ArrayList<float[]>(Arrays.asList(          
            new float[]{210f, 1142f, 533f},
            new float[]{417f, 886f, 562f},
            new float[]{292f, 996f, 552f},
            new float[]{425f, 769f, 549f},
            new float[]{490f, 675f, 558f}));
    
     private static List<float[]> tiamaranta = new ArrayList<float[]>(Arrays.asList(
            new float[]{1383f, 1527f, 146f},
            new float[]{1492f, 1650f, 145f},
            new float[]{1501f, 1415f, 145f},
            new float[]{1588f, 1536f, 145f},
            new float[]{1641f, 1468f, 161f},
            new float[]{1384f, 1599f, 157f},
            new float[]{1438f, 1453f, 144f},
            new float[]{1576f, 1460f, 144f},
            new float[]{1576f, 1604f, 144f},
            new float[]{1428f, 1602f, 144f}));    
}
